package com.yonyou.crm.sys.dynamic.filter;

import java.util.Date;

import com.yonyou.crm.common.util.DateUtil;
import com.yonyou.crm.sys.dynamic.entity.DynamicVO;

public class DateTimeFilter {

	private long now;
	
	public DateTimeFilter(long now) {
		super();
		this.now = now;
	}

	public long getNow() {
		return now;
	}

	public void setNow(long now) {
		this.now = now;
	}

	public void doFilter(DynamicVO dym) {
		Date time = dym.getCreatedTime();
		long t = time.getTime();
		dym.setFormatTime(DateUtil.getFormatDate(System.currentTimeMillis(), t));
	}
}
